<?php
 require "./class_document.php";
 require "./class_document_xml.php";
 require "./class_corpus.php";

 require "../tree/tool_tree.php";
 require "../tree/class_tree.php";
 require "../tree/class_tree_xhtml.php";
 require "../tree/class_structure.php";

 require "../array/tool_array.php";

 require "../files/tool_files_dirs.php";

 include_once("../string/tool_string.php"); 
 include_once("../string/class_segment.php");
           
 require "../misc/class_tag.php";


// print_r(tool_corpus::europa_get_all_ids("../xml/europa/"));
// print_r(tool_corpus::get_all_ids("../xml/europa/","/\.fr/"));

$corpus=tool_corpus::get_corpus_regexp("../xml/europa/","\.fr");
$array_doc=$corpus->__get_array_doc();
//print_r($array_doc);
//die();
foreach($array_doc as $doc){
 $tree=$doc->__get_xhtml_tree();
 tool_tree::cleantreexhtml($tree);
 echo $doc->__get_id();
 //echo "\n";
 //echo tool_tree::tree_xhtml2indentsignature($tree);
 $all_bloc=$tree->__get_all_bloc_min();
 foreach($all_bloc as $bloc){
   echo tool_tree::tree_xhtml2indentsignature($bloc);
/*
   if($bloc->__has_separator()){
    echo "***********\n";
    $res=$bloc->__clean_separator_tag();
    foreach($res as $new_tree){
      echo "_________\n";
      echo tool_tree::tree_xhtml2indentsignature($new_tree);
      echo "_________\n";
    } 
    echo "***********\n";
   }
*/
   echo "============\n";
 }
}

?>
